package com.revai.engine.basic.service;

import java.util.List;
import java.util.Map;

import cn.hutool.json.JSONObject;


public interface ReflectService {
  List<Map<String, Object>> query(String tableName, JSONObject query) throws Exception;
  Long add(String tableName, JSONObject form) throws Exception;
  Object getItem(String tableName, Long id) throws Exception;
  Integer update(String tableName, JSONObject form) throws Exception;

  Integer audit(String tableName, JSONObject form, String authToken) throws Exception;
  // Integer audit(String tableName, JSONObject form, String authToken) throws Exception;
  Integer approve(String tableName, JSONObject form, String authToken) throws Exception;
  Long createHistory(String tableName, JSONObject form, String processKey) throws Exception ;
  Long approveHistory(String tableName, Long businessId) throws Exception;

  Integer delete(String tableName, Long id) throws Exception;

  Object getHistoryByDataId(String tableName, Long id) throws Exception;
  List<Object> queryByIds(String tableName, List<Long> ids) throws Exception;
}